from django.db import models


class Comment(models.Model):
    name = models.CharField('名字', max_length=40)
    email = models.EmailField('邮箱')
    url = models.URLField('个人网站', blank=True)
    content = models.TextField('内容')
    created_time = models.DateTimeField('评论时间', auto_now_add=True)
    post = models.ForeignKey('blog.Post', verbose_name='文章', on_delete=models.CASCADE)

    class Meta:
        verbose_name = '评论'
        verbose_name_plural = verbose_name
